<?php

namespace app\admin\model;

use think\Model;

class Donate extends Model
{
    public function resource(){
        return $this->belongsTo('resource','resource_id','id');
    }
    public function getResourceIdAttr($value){
        return (new Resource())->field('name,scale,count')->find($value);
    }
    public function getUsersIdAttr($value){
        return (new Users())->field('team,id,username,nickname')->find($value);
    }
}